<?php 
/*
$_GET["articleid"];

*/
require("errorhandle.php");

require("phpconnect.php");

$article= file_get_contents("php://input");
$jsonObjs = json_decode($article,true);
 //mysql_query("INSERT INTO Persons (FirstName, LastName, Age) VALUES ('Glenn', 'Quagmire', '33')");
$tmpr = "INSERT INTO article (pid,title,pubtime,source,articleurl,content) VALUES ( " . $jsonObjs["pid"] .",'" . $jsonObjs["title"] ."','" . $jsonObjs["pubtime"] . "','" . $jsonObjs["source"] . "','" . $jsonObjs["articleurl"] ."','" . $jsonObjs["content"] ."' ) ";//$jsonObjs["content"]
//echo $jsonObjs["content"];
$result =mysql_query($tmpr);
if(!$result)
{
    echo "fail";
}
else
{
    echo "sucess";
}

mysql_close($con);
?>